package com.ruoyi.mapper;

import com.ruoyi.entity.po.TChatRoomPopularity;
import com.ruoyi.entity.vo.ChatRoomPopularityVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *@author CHN
 *@since 2024-12-15 11:04
 */
@Mapper
public interface TChatRoomPopularityMapper {

    @Insert("insert into t_chat_room_popularity(room_id,chat_room_member_count,player_mention_count) values (#{record.roomId},#{record.chatRoomMemberCount},#{record.playerMentionCount})")
    int insert(@Param("record") TChatRoomPopularity record);

    int deleteByRoomIds(@Param("roomIds") Integer[] roomIds);

    List<ChatRoomPopularityVo> chatRoomPopularity(@Param("playerId") Integer playerId);
}
